package cn.itcast.factory;

import cn.itcast.domain.User;

/**
 * Created by lenovo on 2018/6/8.
 */
public class UserFactory {
    //静态工厂方法
    public static User userFactory(){
        System.out.println("静态方法创建");
        return new User();
    }
    //实例工厂方法
    public User userFactory2(){
        System.out.println("实例方法创建");
        return new User();
    }
}
